#ifndef PROTOCOL_H
#define PROTOCOL_H
#include "docentity.h"
#include "disparition.h"
#include "user.h"
class Action;
class Protocol : public DocEntity
{
    Q_OBJECT
public:
    Protocol(Disparition* parent=0, Action* Owner=0);
    void giveBithTo();
    QString causes() const;
    User* author();
    Action* owner();
    QWidget* view(DocEntity::ViewTypes viewType=Normal);
    bool saveToDB();
    bool isCompleted();
    void refresh(const RefreshType &refreshType);
protected:
    QString capTemplate();
    bool removeFromDB();
    bool isCorrect();
private:
    QString m_causes;
    User* m_author;
    Action* m_owner;
public slots:
    void setCauses(const QString&Causes);
    void setAuthor(User* Author);
    void approve();
    void check();
private slots:
    void onTableItemClick(int row, int column);
    void appendAction();
};

#endif // PROTOCOL_H
